package mercurius.fitness.client.rb.user.forms;

import mercurius.fitness.client.enumtypes.Height;
import mercurius.fitness.client.enumtypes.Sex;
import mercurius.fitness.client.enumtypes.YesNo;
import mercurius.fitness.client.rb.user.User;
import net.pleso.framework.client.bl.forms.items.IFormItem;
import net.pleso.framework.client.bl.forms.items.IFormItemsGroup;
import net.pleso.framework.client.bl.forms.items.impl.EditFormItem;
import net.pleso.framework.client.bl.forms.items.impl.EnumFormItem;
import net.pleso.framework.client.bl.forms.items.impl.FormItemsGroup;
import net.pleso.framework.client.bl.forms.items.impl.InfoFormItem;

public class UserForm {
	
	protected static IFormItemsGroup[] groups;
	
	static {
		
		IFormItem[] items1 = {
				new InfoFormItem(User.Columns.id),
				new InfoFormItem(User.Columns.user),
				new InfoFormItem(User.Columns.firstname),
				new InfoFormItem(User.Columns.lastname),
				new EditFormItem(User.Columns.hrmax),
				new InfoFormItem(User.Columns.feedkey),
				new InfoFormItem(User.Columns.adminfeedkey)
				};
		
		IFormItem[] items2 = {
				new EditFormItem(User.Columns.height),
				new EnumFormItem(User.Columns.heightunit, Height.getEnum()),
				new EditFormItem(User.Columns.dob),
				new EnumFormItem(User.Columns.gender, Sex.getEnum()),
				new EditFormItem(User.Columns.vo2max),
				new EnumFormItem(User.Columns.newfeedkey, YesNo.getEnum()),
				new EnumFormItem(User.Columns.newadminfeedkey, YesNo.getEnum())
				};
		

		groups = new IFormItemsGroup[] { 
					new FormItemsGroup(null, items1),
					new FormItemsGroup(null, items2)
				};
	}
	 
}
